mon = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]


def run(year):
    if year % 400 == 0 or (year % 100 != 0 and year % 4 == 0):
        return True
    return False


i = 0
for yy in range(2000, 2000000):
    if run(yy):
        mon[2] = 29
    else:
        mon[2] = 28
    for mm in range(1, 13):
        for dd in range(1, mon[mm]+1):
            if yy % mm == 0 and yy % dd == 0:
                i += 1
print(i+1)

# 35813116  2000001
# 35813063  2000000  正解
